import QtQuick 2.9
//import QtQuick.Window 2.2
import QtQuick.Controls 1.4


//import QtQuick.Layouts 1.3
Rectangle {
    id: keyValue
    property string name: ""
    property string value: ""
    property bool selected: false
    height: 18 //parent.height
    width: parent.width
    color: "transparent"

    //    color: Qt.rgba(Math.random(), Math.random(), Math.random(), 1)
    Text {
        text: name
        anchors.top: parent.top
        anchors.bottom: parent.bottom
        anchors.left: parent.left
        width: (parent.width / 2) - 5
        horizontalAlignment: Qt.AlignRight
        color: selected ? "white" : "black"
    }
    Text {
        text: value
        anchors.top: parent.top
        anchors.bottom: parent.bottom
        anchors.right: parent.right
        width: parent.width / 2
        color: selected ? "white" : "black"
        //            id: value
    }
}
